<!-- components/LoadingComponent.vue -->
<template>
  <div class="loading-container">
    <div class="loading-wrapper">
      <div class="loading-spinner">
        <div class="spinner-ring spinner-ring--outer"></div>
        <div class="spinner-ring spinner-ring--inner"></div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: 'LoadingComponent'
}
</script>

<style scoped>
.loading-container {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  width: 100%;
  background-color: rgba(255, 255, 255, 0.8);
  border-radius: 10px;
}

.loading-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.loading-spinner {
  position: relative;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.spinner-ring {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 3px solid transparent;
}

.spinner-ring--outer {
  border-top-color: #6c5dd3;
  animation: spin 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
}

.spinner-ring--inner {
  width: 70%;
  height: 70%;
  border-bottom-color: #a89df5;
  animation: spin-reverse 1s cubic-bezier(0.5, 0, 0.5, 1) infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

@keyframes spin-reverse {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(-360deg);
  }
}

.loading-text {
  margin-top: 15px;
  font-size: 12px;
  color: #6c5dd3;
  font-weight: 500;
  letter-spacing: 1px;
  text-transform: uppercase;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .loading-spinner {
    width: 40px;
    height: 40px;
  }

  .loading-text {
    font-size: 10px;
    margin-top: 10px;
  }
}
</style>
